<template>
  <div id="app">
    父组件-{{ msg }} --- 钱包: {{ money }} -- 车: {{ car }}
    <HmChild :title="msg" :money="money" :car="car" @changeTitle="changeMsg" @changeMoney="money=$event" @changeCar="car=$event" />
  </div>
</template>

<script>
import HmChild from './components/HmChild.vue'
export default {
  name: 'App',
  components: {
    HmChild
  },
  data(){
    return {
      msg: '学IT, 来黑马',
      money: 190,
      car: '自行车'
    }
  },
  methods: {
    changeMsg(title){
      this.msg = title
    }
  }
}
</script>

<style>
#app{
  width: 600px;
  height: 600px;
  border: 4px solid cyan;
}
</style>